export default {
  fetch : function (STORAGE_KEY) {
    return window.JSON.parse(window.sessionStorage.getItem(STORAGE_KEY) || null)
  },
  save:function (STORAGE_KEY,items) {
    let data = window.JSON.stringify(items);
    try {
        window.sessionStorage.setItem(STORAGE_KEY,data);
    } catch(e) {
        alert('请关闭浏览器的无痕模式！');
    }
    window.sessionStorage.setItem(STORAGE_KEY,data);
  },
  clear: function (STORAGE_KEY) {
    window.sessionStorage.removeItem(STORAGE_KEY);
  }
}
